<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :payments }%>

<% content_for :page_title do %>
  /
  <%= I18n.t(:one, scope: "activerecord.models.spree/payment") %>
  /
  <%= Spree.t(:log_entries) %>
<% end %>

<% content_for :page_actions do %>
  <%= button_link_to Spree.t(:logs), spree.admin_order_payment_log_entries_url(@order, @payment), icon: 'file' %>
<% end %>

<table class="table" id='listing_log_entries'>
  <% @log_entries.each do |entry| %>
      <thead>
        <tr class="log_entry <%= entry.parsed_details.success? ? 'success' : 'fail' %>">
          <td colspan="2">
            <h4>
              <span class="icon icon-<%= entry.parsed_details.success? ? 'ok' : 'delete' %>"></span>
              <%= pretty_time(entry.created_at) %>
            </h4>
          </td>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>Message</td>
          <td><%= entry.parsed_details.message %></td>
        </tr>
      </tbody>
  <% end %>
</table>
